package breeze.lepei.der.lepei;

public class LepeiApiUti {
    /**
	*@author BREEZE
	*@description 乐培家长api
	*@date 2020-10-25 12:16:51
	*@version 1.0
	*/
	
	/**
	*@author BREEZE
	*@description 登录
	*@param 手机号/密码
	*@return 链接
	*/
	public static String login(String phone,String password){
		String link="http://139.155.8.227:9090/apiv1/login?phone={phone}&pass={pass}";
		link=link.replace("{phone}",phone).replace("{pass}",password);
		return link;
	}
	
	/**
	*@author BREEZE
	*@description 获取绑定学生信息
	*@param 手机号/token
	*@return 链接
	*/
	public static String getBindStudent(String phone,String token){
		String link="http://139.155.8.227:9090/apiv1/getBindStudent?token={token}&phone={phone}";
		link=link.replace("{phone}",phone).replace("{token}",token);
		return link;
	}
	
	/**
	*@author BREEZE
	*@description 获取公告
	*@return 链接
	*/
	public static String getNotice(){
		return "http://139.155.8.227:9090/apiv1/getNotice";
	}
	
	/**
	*@author BREEZE
	*@description 获取考试全局统计图
	*@return 链接
	*/
	public static String getExamSummaryGraph(String phone,String token,String id){
		String link="http://139.155.8.227:9090/apiv1/getExamSectionInfo?token={token}&phone={phone}&studentId={studentId}";
		link=link.replace("{phone}",phone).replace("{token}",token).replace("{studentId}",id);
		return link;
	}
	
	/**
	*@author BREEZE
	*@description 重置密码
	*@param 手机号/token/新密码
	*/
	public static String resetPassword(String phone,String oldpass,String newpass,String token){
		String link="http://139.155.8.227:9090/apiv1/resetpass?phone={phone}&pass={newpass}&userId={token}&oldPass={oldpass}&token={token}";
		link=link.replace("{phone}",phone).replace("{oldpass}",oldpass).replace("{newpass}",newpass).replace("{token}",token);
		return link;
	}
	
	/**
	*@author BREEZE
	*@description 获取最新考试信息
	*@param 手机号/token/学生id
	*@return 链接
	*/
	public static String getLastedExamInfo(String phone,String token,String stdId){
		String link="http://139.155.8.227:9090/apiv1/getLatestExam?token={token}&phone={phone}&studentId={studentId}";
		return link.replace("{token}",token).replace("{phone}",phone).replace("{studentId}",stdId);
	}
	
	/**
	*@author BREEZE
	*@description 获取历史考试
	*@param 手机号/token/id
	*@return string
	*/
	public static String getStuHistoryExam(String phone,String token,String studentId){
		String link="http://139.155.8.227:9090/apiv1/getStuExams?token={token}&phone={phone}&studentId={studentId}";
		return link.replace("{phone}",phone).replace("{token}",token).replace("{studentId}",studentId);
	}
    
    
}
